<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>genshin-record项目文档 | 秋澪冬安</title>
    <meta name="generator" content="VuePress 1.9.7">
    <link rel="icon" href="/assets/img/favicon.ico">
    <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
    <script>
            var _hmt = _hmt || [];
            (function () {
                let isLocal = window.location.hostname.includes("localhost");
                if(!isLocal){
                    var hm = document.createElement("script");
                    hm.src = "https://hm.baidu.com/hm.js?2b691637b166e447d963eab55f62c51f";
                    var s = document.getElementsByTagName("script")[0];
                    s.parentNode.insertBefore(hm, s);
                }
            })();
            </script>
    <meta name="description" content="一个分享技术、生活，整理笔记的个人博客">
    
    <link rel="preload" href="/assets/css/0.styles.c5fe4079.css" as="style"><link rel="preload" href="/assets/js/app.f1feaaa3.js" as="script"><link rel="preload" href="/assets/js/2.56bc1612.js" as="script"><link rel="preload" href="/assets/js/6.eedbdea5.js" as="script"><link rel="prefetch" href="/assets/js/10.1e88977a.js"><link rel="prefetch" href="/assets/js/11.3149965c.js"><link rel="prefetch" href="/assets/js/12.a751fc6a.js"><link rel="prefetch" href="/assets/js/13.46a65100.js"><link rel="prefetch" href="/assets/js/14.60692bb2.js"><link rel="prefetch" href="/assets/js/15.74268a75.js"><link rel="prefetch" href="/assets/js/16.8a56e86b.js"><link rel="prefetch" href="/assets/js/17.cd4f0314.js"><link rel="prefetch" href="/assets/js/18.e4a559a0.js"><link rel="prefetch" href="/assets/js/19.2812e5f8.js"><link rel="prefetch" href="/assets/js/20.2a8bf95e.js"><link rel="prefetch" href="/assets/js/21.f0e889f9.js"><link rel="prefetch" href="/assets/js/22.be080c8c.js"><link rel="prefetch" href="/assets/js/23.f568ebff.js"><link rel="prefetch" href="/assets/js/24.c8946e24.js"><link rel="prefetch" href="/assets/js/25.13080108.js"><link rel="prefetch" href="/assets/js/26.4b7b31f3.js"><link rel="prefetch" href="/assets/js/27.d7d7f81f.js"><link rel="prefetch" href="/assets/js/28.faeb5048.js"><link rel="prefetch" href="/assets/js/29.1d40cd69.js"><link rel="prefetch" href="/assets/js/3.113aa5f9.js"><link rel="prefetch" href="/assets/js/30.f2d5999d.js"><link rel="prefetch" href="/assets/js/31.3919f392.js"><link rel="prefetch" href="/assets/js/32.d0cb9d84.js"><link rel="prefetch" href="/assets/js/33.67c73b82.js"><link rel="prefetch" href="/assets/js/34.7c153175.js"><link rel="prefetch" href="/assets/js/35.fb1bdca9.js"><link rel="prefetch" href="/assets/js/36.6b4bc7a1.js"><link rel="prefetch" href="/assets/js/4.a7fbcc6d.js"><link rel="prefetch" href="/assets/js/5.cbcdf0da.js"><link rel="prefetch" href="/assets/js/7.7ac30410.js"><link rel="prefetch" href="/assets/js/8.444ebd43.js"><link rel="prefetch" href="/assets/js/9.ecf5a0cc.js">
    <link rel="stylesheet" href="/assets/css/0.styles.c5fe4079.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/assets/img/logo.png" alt="秋澪冬安" class="logo"> <span class="site-name can-hide">秋澪冬安</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">主页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="收藏" class="dropdown-title"><a href="/pages/87b1e9/" class="link-title">收藏</a> <span class="title" style="display:none;">收藏</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/87b1e9/" class="nav-link">网站</a></li><li class="dropdown-item"><!----> <a href="/pages/c47f0e/" class="nav-link">资源</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/archives/" class="nav-link">归档</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="个人建站" class="dropdown-title"><!----> <span class="title" style="display:;">个人建站</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://billsaul.gitee.io/genshinrecord" target="_blank" rel="noopener noreferrer" class="nav-link external">
  原神祈愿记录
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><a href="/about/" class="nav-link">关于</a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><div class="blogger"><img src="/assets/img/head portrait.webp"> <div class="blogger-info"><h3>秋澪冬安</h3> <span></span></div></div> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">主页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="收藏" class="dropdown-title"><a href="/pages/87b1e9/" class="link-title">收藏</a> <span class="title" style="display:none;">收藏</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/87b1e9/" class="nav-link">网站</a></li><li class="dropdown-item"><!----> <a href="/pages/c47f0e/" class="nav-link">资源</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/archives/" class="nav-link">归档</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="个人建站" class="dropdown-title"><!----> <span class="title" style="display:;">个人建站</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://billsaul.gitee.io/genshinrecord" target="_blank" rel="noopener noreferrer" class="nav-link external">
  原神祈愿记录
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><a href="/about/" class="nav-link">关于</a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>瞎折腾</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/pages/ef825e/" class="sidebar-link">Git配置ssh链接远程仓库</a></li><li><a href="/pages/6d1a67/" class="sidebar-link">用 GPG 签名 GitHub的Commit</a></li><li><a href="/pages/a79676/" class="sidebar-link">使用fluxion钓鱼获得wifi密码</a></li><li><a href="/pages/383198/" class="sidebar-link">bat批量删除指定以外的文件和文件夹</a></li><li><a href="/pages/1b1ed0/" class="sidebar-link">npm和yarn全局安装及缓存路径修改</a></li><li><a href="/pages/cc59bd/" class="sidebar-link">使用iPerf3测内网的网速</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>前端</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>树莓派4B</span> <span class="arrow right"></span></p> <!----></section></li><li><a href="/pages/1922ab/" aria-current="page" class="active sidebar-link">genshin-record项目文档</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level2"><a href="/pages/1922ab/#功能" class="sidebar-link">功能</a></li><li class="sidebar-sub-header level2"><a href="/pages/1922ab/#相关信息" class="sidebar-link">相关信息</a></li><li class="sidebar-sub-header level2"><a href="/pages/1922ab/#使用方法" class="sidebar-link">使用方法</a></li><li class="sidebar-sub-header level2"><a href="/pages/1922ab/#相关截图" class="sidebar-link">相关截图</a></li><li class="sidebar-sub-header level2"><a href="/pages/1922ab/#写在最后" class="sidebar-link">写在最后</a></li></ul></li><li><a href="/pages/4568fc/" class="sidebar-link">Windows配置Java环境变量</a></li><li><a href="/pages/c242c9/" class="sidebar-link">✨✨博客站点迁移提示✨✨</a></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-1baff76c><div class="articleInfo" data-v-1baff76c><ul class="breadcrumbs" data-v-1baff76c><li data-v-1baff76c><a href="/" title="首页" class="iconfont icon-home router-link-active" data-v-1baff76c></a></li> <li data-v-1baff76c><a href="/categories/?category=%E5%8D%9A%E5%AE%A2" title="分类" data-v-1baff76c>博客</a></li></ul> <div class="info" data-v-1baff76c><!----> <div title="创建时间" class="date iconfont icon-riqi" data-v-1baff76c><a href="javascript:;" data-v-1baff76c>2021-01-24</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-title">目录</div> <div class="right-menu-content"></div></div></div> <h1><img src="">genshin-record项目文档<!----></h1> <!----> <div class="theme-vdoing-content content__default"><div class="custom-block tip"><p class="custom-block-title">前言</p> <p>无奈于原神没有祈愿计数功能，每次抽还要自己去数，历史记录还只能保存<s>一个月</s>（官方已改为6个月）。作为零氪党的我还要精打细算，所以，我自己花了点时间，写了一个统计的网页出来。当然，每次抽的时候还是要自己来计数哦。</p></div> <div class="custom-block danger"><p class="custom-block-title">迁站提醒</p> <p>本博客已迁移至新域名<a href="https://www.meowpass.com" target="_blank" rel="noopener noreferrer">www.meowpass.com<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>，本域名下的博客不再更新，但不会删除，欢迎访问新域名🎉🎉</p></div> <div class="custom-block warning"><p class="custom-block-title">注意</p> <p>游戏现在能查询6个月以内的抽奖记录了(以前是1个月)，所以打算调整一下这个项目的功能，敬请期待...!</p></div> <p>仓库地址：<a href="https://github.com/BillSaul/genshin-record" target="_blank" rel="noopener noreferrer">genshin-record<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <h2 id="功能"><a href="#功能" class="header-anchor">#</a> 功能</h2> <ul><li><strong>手动</strong>记录抽奖次数、五星出货记录。
<ul><li>用<code>重置次数</code>按钮来重置周期</li> <li>每期up池结束。需要手动去数据库重置本期卡池次数</li> <li>出货记录显示的图标，请自己添加</li></ul></li> <li><strong>自动</strong>计算大保底还是小保底、距离保底剩余次数</li> <li>历史UP卡池记录(<strong>手动</strong>修改)
<ul><li>需要自己去源代码中修改历史up池的数据</li></ul></li> <li><strong>身份验证</strong>，进入页面读取数据之前，需要验证身份，读取对应数据
<ul><li>密码采用sha1加密</li></ul></li></ul> <h2 id="相关信息"><a href="#相关信息" class="header-anchor">#</a> 相关信息</h2> <h3 id="开发技术"><a href="#开发技术" class="header-anchor">#</a> 开发技术</h3> <ul><li><a href="https://cli.vuejs.org/zh/" target="_blank" rel="noopener noreferrer">Vue-CLI<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>开发</li> <li>UI组件库：<a href="https://element.eleme.cn/#/zh-CN" target="_blank" rel="noopener noreferrer">element-ui<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li> <li>后端数据库：<a href="https://www.leancloud.cn/" target="_blank" rel="noopener noreferrer">leancloud<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li> <li>插件：<a href="https://vuex.vuejs.org/zh/" target="_blank" rel="noopener noreferrer">Vuex<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>，sha1</li></ul> <h3 id="目录结构"><a href="#目录结构" class="header-anchor">#</a> 目录结构</h3> <div class="custom-block tip"><p class="custom-block-title">结构树</p> <div class="language- extra-class"><pre class="language-text"><code>.
│
├── dist (打包生成目录)
├── public
├── src
│   ├── api (数据库相关文件)
│   ├── assets (静态资源)
│   │   ├── arms-img (武器up池封面)
│   │   ├── cover-img (角色up池封面)
│   │   └── icon-img (五星出货图标)
│   ├── components (Vue组件)
│   ├── css
│   └── store (Vuex插件目录)
├── App.vue
├── vue.config.js
└── main.js
</code></pre></div></div> <h2 id="使用方法"><a href="#使用方法" class="header-anchor">#</a> 使用方法</h2> <p>克隆本仓库到本地</p> <div class="language- extra-class"><pre class="language-text"><code>git clone https://github.com/BillSaul/genshin-record.git
</code></pre></div><h3 id="环境要求"><a href="#环境要求" class="header-anchor">#</a> 环境要求</h3> <ul><li>nodejs</li> <li>yarn</li></ul> <h3 id="获取appid、appkey和服务器地址"><a href="#获取appid、appkey和服务器地址" class="header-anchor">#</a> 获取AppID、AppKey和服务器地址</h3> <p>请先<a href="https://leancloud.cn/dashboard/login.html#/signin" target="_blank" rel="noopener noreferrer">登录<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>或<a href="https://leancloud.cn/dashboard/login.html#/signup" target="_blank" rel="noopener noreferrer">注册<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> <code>LeanCloud</code>, 进入<a href="https://leancloud.cn/dashboard/applist.html#/apps" target="_blank" rel="noopener noreferrer">控制台<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>后点击左下角<a href="https://leancloud.cn/dashboard/applist.html#/newapp" target="_blank" rel="noopener noreferrer">创建应用<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>：
</p><div class="pageimg" style="text-align:center;"><img src="" alt="图片"></div><p></p> <p>创建好后，进入刚刚创建的应用，选择左下角的<code>设置</code>-&gt;<code>应用 Keys</code>，就能看到AppID、AppKey和服务器地址
</p><div class="pageimg" style="text-align:center;"><img src="" alt="图片"></div><p></p> <h3 id="初始化数据库"><a href="#初始化数据库" class="header-anchor">#</a> 初始化数据库</h3> <h4 id="创建class"><a href="#创建class" class="header-anchor">#</a> 创建Class</h4> <p>本项目没有相关数据创建的操作，所有数据的创建，需自己进入<code>LeanCloud</code>手动创建。左上角<code>储存</code>-&gt;<code>结构化数据</code>-&gt;<code>创建class</code>，需要创建2个class，<code>data</code>和<code>user</code>。创建好后，点击<code>添加列</code>添加字段
</p><div class="pageimg" style="text-align:center;"><img src="" alt="图片"></div><p></p> <p><code>data</code>字段说明：</p> <table><thead><tr><th>字段</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>id</td> <td>string</td> <td>用户唯一标识，必须与<code>user</code>内的id对应</td></tr> <tr><td>roleNum</td> <td>string</td> <td>角色up池的抽奖次数（90次为一个周期）</td></tr> <tr><td>roleThis_num</td> <td>string</td> <td>本期角色up池的抽奖次数</td></tr> <tr><td>roleInfo</td> <td>string</td> <td>角色up池是大保底还是小保底</td></tr> <tr><td>roleGet</td> <td>string</td> <td>角色up的五星出货记录，以<code>/</code>为分隔符</td></tr> <tr><td>armsNum</td> <td>string</td> <td>武器up池的抽奖次数（90次为一个周期）</td></tr> <tr><td>armsThis_num</td> <td>string</td> <td>本期角色up池的抽奖次数</td></tr> <tr><td>armsInfo</td> <td>string</td> <td>武器up池是大保底还是小保底</td></tr> <tr><td>armsGet</td> <td>string</td> <td>武器up的五星出货记录，以<code>/</code>为分隔符</td></tr> <tr><td>permanentNum</td> <td>string</td> <td>常驻池的抽奖次数</td></tr> <tr><td>permanentGet</td> <td>string</td> <td>常驻池的五星出货记录，以<code>/</code>为分隔符</td></tr></tbody></table> <p><code>user</code>字段说明：</p> <table><thead><tr><th>字段</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>id</td> <td>string</td> <td>用户唯一标识，必须与<code>data</code>内的id对应</td></tr> <tr><td>password</td> <td>string</td> <td>用户密码，sha1加密</td></tr></tbody></table> <h4 id="配置数据库"><a href="#配置数据库" class="header-anchor">#</a> 配置数据库</h4> <p>将<code>./src/api/</code>中的<code>LeanCloud-Demo.js</code>和<code>DataServer-Demo.js</code>修改为<code>LeanCloud.js</code>和<code>DataServer.js</code></p> <p>在<code>LeanCloud.js</code>中填入AppID、AppKey和服务器地址：</p> <div class="language- extra-class"><pre class="language-text"><code>// LeanCloud.js

import AV from 'leancloud-storage';

AV.init({
    appId: &quot;AppID&quot;,
    appKey: &quot;AppKey&quot;,
    serverURL: &quot;服务器地址&quot;
});

export default AV
</code></pre></div><p>可选配置：</p> <div class="language- extra-class"><pre class="language-text"><code>// DataServer.js

let sql_data = 'data' // 储存数据的表
let sql_user = 'user' // 储存用户ID的表
</code></pre></div><h3 id="创建vue-config-js"><a href="#创建vue-config-js" class="header-anchor">#</a> 创建vue.config.js</h3> <p>如果你是将网站托管到github pages或者是gitee pages之类的网站上，则必须在项目根目录创建<code>vue.config.js</code>文件。如果是服务器上，则可以不创建</p> <div class="language- extra-class"><pre class="language-text"><code>// vue.config.js

module.exports = {
    publicPath: process.env.NODE_ENV === 'production'
        ? '/替换成你的仓库名字/'
        : '/'
}
</code></pre></div><h3 id="启动本地调试"><a href="#启动本地调试" class="header-anchor">#</a> 启动本地调试</h3> <div class="language- extra-class"><pre class="language-text"><code>yarn serve
</code></pre></div><p>启动成功后访问<code>http://localhost:8080/</code>查看效果</p> <h3 id="打包构建"><a href="#打包构建" class="header-anchor">#</a> 打包构建</h3> <div class="language- extra-class"><pre class="language-text"><code>yarn build
</code></pre></div><p>构建输出为 dist 目录</p> <h3 id="部署"><a href="#部署" class="header-anchor">#</a> 部署</h3> <p>打包构建成功后，就可以自己部署到github pages之类的托管平台上，或者是部署到自己的服务器上。具体方法网上有很多，这里不多赘述了。</p> <h2 id="相关截图"><a href="#相关截图" class="header-anchor">#</a> 相关截图<div class="pageimg" style="text-align:center;"><img src="" alt="图片"></div><div class="pageimg" style="text-align:center;"><img src="" alt="图片"></div></h2> <h2 id="写在最后"><a href="#写在最后" class="header-anchor">#</a> 写在最后</h2> <p>如果你实在搭建不好，你也可以把你想设置的密码和卡池抽卡次数的相关信息通过邮箱发给我。我收到后，给你创建相关数据，你就能使用我搭建的了。</p> <p>邮箱地址：<code>billsaul@github.email.cn</code></p> <p>期待原神有一天能添加抽奖次数的显示，方便我们计算保底 (。・∀・)</p></div></div> <!----> <div class="page-edit"><!----> <div class="tags"><a href="/tags/?tag=%E5%8E%9F%E7%A5%9E" title="标签">#原神</a></div> <div class="last-updated"><span class="prefix">上次编辑:</span> <span class="time">2021/08/29, 21:00:39</span></div></div> <div class="page-nav-wapper"><!----> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/pages/f69060/" class="prev">根据CPU温度控制风扇</a></span> <span class="next"><a href="/pages/4568fc/">Windows配置Java环境变量</a>→
      </span></p></div></div></div> <div class="article-list"><div class="article-title"><a href="/archives/" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/pages/c242c9/"><div>
            ✨✨博客站点迁移提示✨✨
            <!----></div></a> <span class="date">04-24</span></dt></dl><dl><dd>02</dd> <dt><a href="/pages/d38aff/"><div>
            VSCode生成头部注释
            <!----></div></a> <span class="date">01-03</span></dt></dl><dl><dd>03</dd> <dt><a href="/pages/f002e9/"><div>
            VSCode配置文件配置项
            <!----></div></a> <span class="date">12-22</span></dt></dl> <dl><dd></dd> <dt><a href="/archives/" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><div class="icons"><a href="https://github.com/BillSaul" title="GitHub" target="_blank" class="iconfont icon-github-fill-round"></a><a href="mailto:billsaul@github.email.cn" title="发邮件" target="_blank" class="iconfont icon-email"></a><a href="https://gitee.com/billsaul" title="Gitee" target="_blank" class="iconfont icon-gitee-fill-round"></a></div> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2020-2022
    <span>秋澪冬安 | Gitee BillSaul</span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.f1feaaa3.js" defer></script><script src="/assets/js/2.56bc1612.js" defer></script><script src="/assets/js/6.eedbdea5.js" defer></script>
  </body>
</html>
